python find first occurrence in list

37

next(obj for obj in objs if obj.val == 5)

Comments

Submit
0 Comments